home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 131 / XENIATGM131.iso / Goodies / I-WAR 2 Egde of Chaos - New SDK / IW2-EOC_Pog_Scripting_SDK.exe / include / GUI.h < prev    next >
C/C++ Source or Header  |  2002-01-14  |  32KB  |  1,122 lines

  1. //
  2. // (c) 1999 Particle Systems Ltd. All Rights Reserved
  3. //
  4. // GUI.h
  5. //
  6. // Pog header for the GUI creation package. 
  7. //
  8. // Revision control information:
  9. //
  10. // $Header: /flux/packages/GUI.h 44    11/04/01 16:11 Tim $
  11. //
  12.  
  13. #include "Flux.h"
  14.  
  15. #ifdef FLUX_COMPILE
  16.  
  17. FLUX_DECLARE_EXTENSION(Gui);
  18.  
  19. #ifdef FLUX_LIB
  20. #if _MSC_VER >= 1000
  21. #pragma comment( lib, "gui" )
  22. #endif // _MSC_VER >= 1000
  23. #endif // FLUX_LIB
  24.  
  25. #else
  26.  
  27. // Enumeration ////////////////////////////////////////////////////////////////
  28.  
  29. // The GUI sounds enum - maintain in parallel with FcWindow::eSound
  30. enum eSound
  31. {
  32.     S_None,
  33.     S_Minor,
  34.     S_Confirm,
  35.     S_Error,
  36.     S_Loadout,
  37.     S_MechConfirm,
  38.     S_AddProgram,
  39.     S_RemoveProgram,
  40.     S_AddUpgrade,
  41.     S_RemoveUpgrade
  42. };
  43.  
  44. // Icon types which can be used on customisable buttons - maintain in parallel
  45. // with icCustomisableWindowAvatar::eIcon
  46. enum eIcon
  47. {
  48.     I_None,
  49.     I_LeftArrowOn,
  50.     I_LeftArrowOff,
  51.     I_RightArrowOn,
  52.     I_RightArrowOff,
  53.     I_CircleOn,
  54.     I_CircleOff,
  55.     I_Count
  56. };
  57.  
  58. // Handle definitions /////////////////////////////////////////////////////////
  59.  
  60. // We need a handle to a window to control the GUI
  61. handle hwindow : hobject;
  62.  
  63. // Screen manipulation and access functions ///////////////////////////////////
  64.  
  65. //
  66. // hwindow GUI.Cast( hobject window )
  67. //
  68. // Cast up to a window
  69. //
  70. prototype hwindow GUI.Cast( hobject window );
  71.  
  72. //
  73. // GUI.PushScreen( string screen_class )
  74. //
  75. // Creates a new screen of the class given in the screen_class parameter. Pushes
  76. // the new screen onto the screen stack, making it current.
  77. //
  78. prototype GUI.PushScreen( string screen_class );
  79.  
  80. //
  81. // GUI.PopScreen()
  82. //
  83. // Pops the current screen from the screen stack, deleting it.
  84. //
  85. prototype GUI.PopScreen();
  86.  
  87. //
  88. // GUI.OverlayScreen()
  89. //
  90. // Overlays an instance of the given screen class onto the current screen.
  91. //
  92. prototype GUI.OverlayScreen(string screen_class);
  93.  
  94. //
  95. // GUI.RemoveLastOverlay()
  96. //
  97. // Remove the last (i.e. top) overlay
  98. //
  99. prototype GUI.RemoveLastOverlay();
  100.  
  101. //
  102. // GUI.RemoveOverlaysAfter( string screen_class )
  103. //
  104. // Remove all overlays from the overlay list from the given class on.
  105. //
  106. prototype GUI.RemoveOverlaysAfter( string screen_class );
  107.  
  108. //
  109. // GUI.SetScreen( string screen_class )
  110. //
  111. // Set the given screen at the expense of the current one.
  112. //
  113. prototype GUI.SetScreen( string screen_class );
  114.  
  115. //
  116. // GUI.ClearAllScreens()
  117. //
  118. // Pops all screens off the stack.
  119. //
  120. prototype GUI.ClearAllScreens();
  121.  
  122. //
  123. // GUI.PopScreensTo( string screen_class )
  124. //
  125. // Pops screens until we run out or arrive at the named screen
  126. //
  127. prototype GUI.PopScreensTo( string screen_class );
  128.  
  129. //
  130. // string GUI.CurrentScreenClassname()
  131. //
  132. // Returns the classname of the topmost GUI screen.
  133. //
  134. prototype string GUI.CurrentScreenClassname();
  135.  
  136. //
  137. // int GUI.NumScreens()
  138. //
  139. // Get the number of screens (excluding overlays) on the screen stack
  140. //
  141. prototype int GUI.NumScreens();
  142.  
  143. // Window manager functions ///////////////////////////////////////////////////
  144.  
  145. //
  146. // hwindow GUI.TopWindow()
  147. //
  148. // Gets the top level window from the current GUI screen's window frame.
  149. //
  150. prototype hwindow GUI.TopWindow();
  151.  
  152. //
  153. // int GUI.FrameWidth()
  154. //
  155. // The width in frame units of the current GUI screen's window frame.
  156. //
  157. prototype int GUI.FrameWidth();
  158.  
  159. //
  160. // int GUI.FrameHeight()
  161. //
  162. // The height in frame units of the current GUI screen's window frame.
  163. //
  164. prototype int GUI.FrameHeight();
  165.  
  166. //
  167. // GUI.SetDefaultFont( string font_request )
  168. //
  169. // Set the default font for the screen.
  170. //
  171. prototype GUI.SetDefaultFont( string font_request );
  172.  
  173. //
  174. // GUI.SetDefaultColour( float red, float green, float blue )
  175. //
  176. // Set the default colour for text and drawing on the screen. All colour values
  177. // should be in [0,1].
  178. //
  179. prototype GUI.SetDefaultColour( float red, float green, float blue );
  180.  
  181. //
  182. // GUI.SetBackgroundImage( string image_request, bool dim )
  183. //
  184. // Set the image to use as a background for this GUI screen and determine
  185. // whether nor not to dim it.
  186. //
  187. prototype GUI.SetBackgroundImage( string image_request, 
  188.                                   bool dim );
  189.  
  190. //
  191. // GUI.SetFirstControlFocus( hwindow first_focus )
  192. //
  193. // Set the first control focus - i.e. the first window to select from none selected
  194. //
  195. prototype GUI.SetFirstControlFocus( hwindow first_focus );
  196.  
  197. //
  198. // GUI.DeleteWindow( hwindow window )
  199. //
  200. // Delete the window with the given handle
  201. //
  202. prototype GUI.DeleteWindow( hwindow window );
  203.  
  204. //
  205. // GUI.SetControlFocusCancelFunction( string function )
  206. //
  207. // If the control focus 'Cancel' is performed at a level where no windows above
  208. // the focused one will accept the control focus then this function is called
  209. // instead.
  210. //
  211. prototype GUI.SetControlFocusCancelFunction( string function );
  212.  
  213. //
  214. // GUI.SetFocus( hwindow window )
  215. //
  216. // Used to manually set the focus to the given window
  217. //
  218. prototype GUI.SetFocus( hwindow window );
  219.  
  220. //
  221. // hwindow GUI.FocusedWindow()
  222. //
  223. // Get the currently focused window
  224. //
  225. prototype hwindow GUI.FocusedWindow();
  226.  
  227. //
  228. // GUI.CancelFocusLock()
  229. //
  230. // Cancel any current focus locking.
  231. //
  232. prototype GUI.CancelFocusLock();
  233.  
  234. // Sound support //////////////////////////////////////////////////////////////
  235.  
  236. //
  237. // GUI.RegisterSound( string sound_request, eSound sound )
  238. //
  239. // Set a sound for a class of GUI event
  240. //
  241. prototype GUI.RegisterSound( string sound_request, eSound sound );
  242.  
  243. //
  244. // bool GUI.QueueSound( eSound sound )
  245. //
  246. // Play a GUI audio cue next frame
  247. //
  248. prototype bool GUI.QueueSound( eSound sound );
  249.  
  250. //
  251. // bool GUI.PlaySound( eSound sound )
  252. //
  253. // Play a GUI audio cue immediately. Also purges the sound queue.
  254. //
  255. prototype bool GUI.PlaySound( eSound sound );
  256.  
  257. //
  258. // bool GUI.StartSound( eSound sound )
  259. //
  260. // Start a GUI looping sound.
  261. //
  262. prototype bool GUI.StartSound( eSound sound );
  263.  
  264. //
  265. // bool GUI.StopSound( eSound sound )
  266. //
  267. // Stop any looping sound.
  268. //
  269. prototype bool GUI.StopSound( eSound sound );
  270.  
  271. //
  272. // GUI.SetBeepOnGainFocus( bool beep )
  273. //
  274. // Set a window to beep when it gains focus
  275. //
  276. prototype GUI.SetBeepOnGainFocus( bool beep );
  277.  
  278. // Base window /////////////////////////////////////////////////////////////////
  279.  
  280. //
  281. // hwindow GUI.CreateWindow( int x, int y, 
  282. //                             int width, int height, 
  283. //                             hwindow parent )
  284. //
  285. // Create a basic window. It doesn't do anything, but it can be used to group
  286. // radio buttons together (radio buttons group with their siblings).
  287. //
  288. prototype hwindow GUI.CreateWindow( int x, int y, 
  289.                                     int width, int height, 
  290.                                     hwindow parent );
  291.  
  292. //
  293. // GUI.SetWindowClientArea( hwindow window, int left, int top, int right, int bottom )
  294. //
  295. // Set the window's client area. Will increase the canvas too if necessary
  296. //
  297. prototype GUI.SetWindowClientArea( hwindow window, 
  298.                                    int left, int top, int right, int bottom );
  299.  
  300. //
  301. // GUI.RepositionWindow( hwindow window, hwindow parent, 
  302. //                       int x_offset, int next_y )
  303. //
  304. // Remove a window from its current parent and reset the window with a new parent
  305. // and offset into that parent.
  306. //
  307. prototype GUI.RepositionWindow( hwindow window, hwindow parent, 
  308.                                 int x_offset, int next_y );
  309.         
  310. //
  311. // GUI.SetWindowFont( hwindow window, string font_request )
  312. //
  313. // Set the font for a given window.
  314. //
  315. prototype GUI.SetWindowFont( hwindow window, string font_request );
  316.  
  317. //
  318. // GUI.SetWindowTitle( hwindow window, string title )
  319. //
  320. // Set the title for a given window.
  321. //
  322. prototype GUI.SetWindowTitle( hwindow window, string title );
  323.  
  324. //
  325. // string GUI.WindowTitle( hwindow window )
  326. //
  327. // Get the title for a given window.
  328. //
  329. prototype string GUI.WindowTitle( hwindow window );
  330.  
  331. //
  332. // GUI.SetWindowPreviousFocus( hwindow window, hwindow focus )
  333. //
  334. // Set the window that the control focus will be shifted to if the focus is shifted
  335. // to the next window.
  336. //
  337. prototype GUI.SetWindowPreviousFocus( hwindow window, hwindow focus );
  338.  
  339. //
  340. // GUI.SetWindowNextFocus( hwindow window, hwindow focus )
  341. //
  342. // Set the window that the control focus will be shifted to if the focus is shifted
  343. // to the next window.
  344. //
  345. prototype GUI.SetWindowNextFocus( hwindow window, hwindow focus );
  346.  
  347. //
  348. // hwindow GUI.WindowPreviousFocus( hwindow window )
  349. //
  350. // Get the previous focus
  351. //
  352. prototype hwindow GUI.WindowPreviousFocus( hwindow window );
  353.  
  354. //
  355. // hwindow GUI.WindowNextFocus( hwindow window )
  356. //
  357. // Get the next focus
  358. //
  359. prototype hwindow GUI.WindowNextFocus( hwindow window );
  360.  
  361. //
  362. // GUI.SetWindowAcceptFocus( hwindow window, bool accept )
  363. //
  364. // Set whether or not a window will accept focus
  365. //
  366. prototype GUI.SetWindowAcceptFocus( hwindow window, bool accept );
  367.  
  368. //
  369. // int GUI.WindowCanvasWidth( hwindow window )
  370. //
  371. // Get the width of a window canvas
  372. //
  373. prototype int GUI.WindowCanvasWidth( hwindow window );
  374.  
  375. //
  376. // int GUI.WindowCanvasHeight( hwindow window )
  377. //
  378. // Get the height of a window canvas
  379. //
  380. prototype int GUI.WindowCanvasHeight( hwindow window );
  381.  
  382. //
  383. // GUI.SetVisible( hwindow window, bool visible )
  384. //
  385. // Set whether or not the given window is visible
  386. //
  387. prototype GUI.SetVisible( hwindow window, bool visible );
  388.  
  389. //
  390. // GUI.SetInputOverrideFunctions( hwindow window,
  391. //                                  string cf_left,
  392. //                                  string cf_up,
  393. //                                  string cf_right,
  394. //                                  string cf_down,
  395. //                                  string cf_select,
  396. //                                  string cf_cancel,
  397. //                                  string mouse_down,
  398. //                                  string mouse_up,
  399. //                                  string mouse_down_held );
  400. //
  401. // Set functions overriding the normal window behaviour in the situation of
  402. // the various control focus commands being given.
  403. //
  404. prototype GUI.SetInputOverrideFunctions( 
  405.     hwindow window,
  406.     string cf_left,
  407.     string cf_up,
  408.     string cf_right,
  409.     string cf_down,
  410.     string cf_select,
  411.     string cf_cancel,
  412.     string mouse_down,
  413.     string mouse_up,
  414.     string mouse_down_held );
  415.  
  416. //
  417. // GUI.SelectWindow( hwindow window )
  418. //
  419. // Select a window
  420. //
  421. prototype GUI.SelectWindow( hwindow window );
  422.  
  423. //
  424. // GUI.DeselectWindow( hwindow window )
  425. //
  426. // Deselect a window
  427. //
  428. prototype GUI.DeselectWindow( hwindow window );
  429.  
  430. //
  431. // hwindow GUI.FirstChild( hwindow window )
  432. //
  433. // Get the first child of the given window
  434. //
  435. prototype hwindow GUI.FirstChild( hwindow window );
  436.  
  437. //
  438. // hwindow GUI.NextSibling( hwindow window )
  439. //
  440. // Get the next sibling of the given window
  441. //
  442. prototype hwindow GUI.NextSibling( hwindow window );
  443.  
  444. // Script generated input messages ///////////////////////////////////////////
  445.  
  446. prototype GUI.OnControlFocusLeft( hwindow window );
  447. prototype GUI.OnControlFocusUp( hwindow window );
  448. prototype GUI.OnControlFocusRight( hwindow window );
  449. prototype GUI.OnControlFocusDown( hwindow window );
  450. prototype GUI.OnControlFocusSelect( hwindow window );
  451. prototype GUI.OnControlFocusCancel( hwindow window );
  452.  
  453. // Customisable windows - e.g. buttons, text controls and checkboxes /////////
  454.  
  455. // 
  456. // GUI.SetWindowStateColours( hwindow customisable_window, 
  457. //                              float n_red, float n_green, float n_blue, 
  458. //                              float f_red, float f_green, float f_blue,
  459. //                            float s_red, float s_green, float s_blue );
  460. //
  461. // Set the window colour for each of the four possible window states.
  462. //
  463. prototype GUI.SetWindowStateColours( hwindow customisable_window, 
  464.                                      float n_red, float n_green, float n_blue, 
  465.                                      float f_red, float f_green, float f_blue,
  466.                                      float s_red, float s_green, float s_blue );
  467.  
  468. // 
  469. // GUI.Window[Neutral|Focused|Selected][Red|Green|Blue]
  470. //
  471. // Get the window colours for the various states
  472. //
  473. prototype float GUI.WindowNeutralRed( hwindow window );
  474. prototype float GUI.WindowNeutralGreen( hwindow window );
  475. prototype float GUI.WindowNeutralBlue( hwindow window );
  476. prototype float GUI.WindowFocusedRed( hwindow window );
  477. prototype float GUI.WindowFocusedGreen( hwindow window );
  478. prototype float GUI.WindowFocusedBlue( hwindow window );
  479. prototype float GUI.WindowSelectedRed( hwindow window );
  480. prototype float GUI.WindowSelectedGreen( hwindow window );
  481. prototype float GUI.WindowSelectedBlue( hwindow window );
  482.  
  483. //
  484. // GUI.SetWindowStateTextures( hwindow customisable_window,
  485. //                               string texture_request, 
  486. //                               int n_l_l, int n_l_t, int n_l_r, int n_l_b,
  487. //                               int n_b_l, int n_b_t, int n_b_r, int n_b_b,
  488. //                               int n_r_l, int n_r_t, int n_r_r, int n_r_b,
  489. //                               int f_l_l, int f_l_t, int f_l_r, int f_l_b,
  490. //                               int f_b_l, int f_b_t, int f_b_r, int f_b_b,
  491. //                               int f_r_l, int f_r_t, int f_r_r, int f_r_b,
  492. //                               int s_l_l, int s_l_t, int s_l_r, int s_l_b,
  493. //                               int s_b_l, int s_b_t, int s_b_r, int s_b_b,
  494. //                               int s_r_l, int s_r_t, int s_r_r, int s_r_b )
  495. //
  496. // Set the textures to display on customisable controls for each of its states.
  497. // The textures are drawn piece meal so we need three for each - one for the
  498. // left hand end, one for the right hand end and one for the body of the window -
  499. // between the two ends. 
  500. // 
  501. // Each page area is passed as a four integers forming a rectangle - such that
  502. // 'n_l_t' is the top part of the page area for the left hand side for the 
  503. // neutral state.
  504. //
  505. prototype GUI.SetWindowStateTextures( hwindow customisable_window,
  506.                                       string texture_request, 
  507.                                       int n_l_l, int n_l_t, int n_l_r, int n_l_b,
  508.                                       int n_b_l, int n_b_t, int n_b_r, int n_b_b,
  509.                                       int n_r_l, int n_r_t, int n_r_r, int n_r_b,
  510.                                       int f_l_l, int f_l_t, int f_l_r, int f_l_b,
  511.                                       int f_b_l, int f_b_t, int f_b_r, int f_b_b,
  512.                                       int f_r_l, int f_r_t, int f_r_r, int f_r_b,
  513.                                       int s_l_l, int s_l_t, int s_l_r, int s_l_b,
  514.                                       int s_b_l, int s_b_t, int s_b_r, int s_b_b,
  515.                                       int s_r_l, int s_r_t, int s_r_r, int s_r_b );
  516.  
  517. // 
  518. // GUI.SetWindowTextFormatting( hwindow customisable_window, 
  519. //                                bool centred, 
  520. //                                int text_offset );
  521. //
  522. // Set the window's text formatting - should the text be centred? If not, how
  523. // much offset from the left of the canvas should there be?
  524. //
  525. prototype GUI.SetWindowTextFormatting( hwindow customisable_window, 
  526.                                        bool centred, 
  527.                                        int text_offset );
  528.  
  529. //
  530. // GUI.SetWindowStateIcons( 
  531. //    hwindow window, 
  532. //    eIcon neutral,
  533. //    eIcon focused,
  534. //    eIcon selected )
  535. //
  536. // Set icons for this window for the various window states
  537. //
  538. prototype GUI.SetWindowStateIcons( 
  539.     hwindow window, 
  540.     eIcon neutral,
  541.     eIcon focused,
  542.     eIcon selected );
  543.  
  544. // Decorators //////////////////////////////////////////////////////////////////
  545.  
  546. //
  547. // hwindow GUI.CreateBorder( hwindow target )
  548. //
  549. // Create a border around the given window
  550. //
  551. prototype hwindow GUI.CreateBorder( hwindow target );
  552.  
  553. //
  554. // hwindow GUI.CreateFancyBorder( hwindow target )
  555. //
  556. // Create a fancy border around the given window
  557. //
  558. prototype hwindow GUI.CreateFancyBorder( hwindow target );
  559.  
  560. //
  561. // hwindow GUI.CreateHorizontalScrollbarDecorator( hwindow target )
  562. //
  563. // Create a horizontal scrollbar around the given window
  564. //
  565. prototype hwindow GUI.CreateHorizontalScrollbarDecorator( hwindow target );
  566.  
  567. //
  568. // hwindow GUI.CreateHorizontalScrollbar( int x, int y,
  569. //                                          int width,
  570. //                                          hwindow parent,
  571. //                                          hwindow target )
  572. //
  573. // Create a horizontal scrollbar. Note that this function does not create a 
  574. // window as a decorator, but still attaches and monitors another window.
  575. //
  576. prototype hwindow GUI.CreateHorizontalScrollbar( int x, int y,
  577.                                                  int width,
  578.                                                  hwindow parent,
  579.                                                  hwindow target );
  580.  
  581. //
  582. // hwindow GUI.CreateVerticalScrollbarDecorator( hwindow target, 
  583. //                                                 float button_length_factor )
  584. //
  585. // Create a vertical scrollbar around the given window. This creates a normal
  586. // scrollbar - not a fancy one.
  587. //
  588. prototype hwindow GUI.CreateVerticalScrollbarDecorator( hwindow target );
  589.  
  590. //
  591. // hwindow GUI.CreateVerticalScrollbar( int x, int y,
  592. //                                        int height,
  593. //                                        hwindow parent,
  594. //                                        hwindow target,
  595. //                                        float button_length_to_width_ratio,
  596. //                                        string avatar_hint );
  597. //
  598. // Creates a vertical scrollbar at the given point of the given size, attached
  599. // to the given target. We also pass in the ratio between scrollbar width and
  600. // button length (to allow the new window to set it's clickable mouse areas 
  601. // correctly) and a hint to the avatar factory, which allows us to tailor the 
  602. // avatar used to draw the scrollbar.
  603. //
  604. prototype hwindow GUI.CreateVerticalScrollbar( 
  605.     int x, int y,
  606.     int width, int height,
  607.     hwindow parent,
  608.     hwindow target,
  609.     float button_length_to_width_ratio,
  610.     string avatar_hint );
  611.  
  612. //
  613. // hwindow GUI.CreateDualScrollbars( hwindow target );
  614. //
  615. // Create both horizontal and vertical scrollbars around the given window. This 
  616. // creates normal scrollbars - not fancy ones.
  617. //
  618. prototype hwindow GUI.CreateDualScrollbars( hwindow target );
  619.  
  620. //
  621. // GUI.ReattachScrollbar( hwindow scrollbar, hwindow target )
  622. //
  623. // Change the window that a scrollbar is attached to
  624. //
  625. prototype GUI.ReattachScrollbar( hwindow scrollbar, hwindow target );
  626.  
  627. // Static window /////////////////////////////////////////////////////////////// 
  628.  
  629. //
  630. // hwindow GUI.CreateStaticWindow( int x, int y,
  631. //                                   int width, int height,
  632. //                                   hwindow parent )
  633. //
  634. // Create a static window - displays its title and an image
  635. //
  636. prototype hwindow GUI.CreateStaticWindow( int x, int y,
  637.                                           int width, int height,
  638.                                           hwindow parent );
  639.  
  640. // Button ////////////////////////////////////////////////////////////////////// 
  641.  
  642. //
  643. // hwindow GUI.CreateButton( int x, int y,
  644. //                             int width, int height, 
  645. //                             hwindow parent )
  646. //
  647. // Create a normal 'button' GUI element, with it's top-left hand corner in the 
  648. // given position, with the given width and height (all in frame units) and with
  649. // the given parent.
  650. //
  651. prototype hwindow GUI.CreateButton( int x, int y,
  652.                                     int width, int height,
  653.                                     hwindow parent );
  654.  
  655. //
  656. // hwindow GUI.CreateBackButton( int x, int y,
  657. //                                 int width, int height, 
  658. //                                 hwindow parent )
  659. //
  660. // Create a back button - like a normal button, but with added avatar
  661. //
  662. prototype hwindow GUI.CreateBackButton( int x, int y,
  663.                                         int width, int height,
  664.                                         hwindow parent );
  665.  
  666. //
  667. // GUI.SetButtonFunctionPog( hwindow button, string function )
  668. //
  669. // Set a button's execution function to the given pog function.
  670. //
  671. prototype GUI.SetButtonFunctionPog( hwindow button, string function );
  672.  
  673. // Text window /////////////////////////////////////////////////////////////////
  674.  
  675. //
  676. // hwindow GUI.CreateTextWindow( int x, int y, 
  677. //                                 int width, int height, 
  678. //                                 hwindow parent )
  679. //
  680. // Create a 'text window' GUI element, with it's top-left hand corner in the 
  681. // given position, with the given width and height (all in frame units) and with
  682. // the given parent.
  683. //
  684. prototype hwindow GUI.CreateTextWindow( int x, int y,
  685.                                         int width, int height,
  686.                                         hwindow parent );
  687.  
  688. //
  689. // GUI.SetTextWindowString( hwindow text_window, string text );
  690. //
  691. // Sets the text contained in a text window to the given string.
  692. //
  693. prototype GUI.SetTextWindowString( hwindow text_window, string text );
  694.  
  695. //
  696. // GUI.SetTextWindowResource( hwindow text_window, string resource );
  697. //
  698. // Sets the text contained in a text window to the string found in the given
  699. // resource.
  700. //
  701. prototype GUI.SetTextWindowResource( hwindow text_window, string resource );
  702.  
  703. //
  704. // bool GUI.TextWindowBack( hwindow text_window );
  705. //
  706. // Shifts the text window to show the previous HTML page
  707. //
  708. prototype bool GUI.TextWindowBack( hwindow text_window );
  709.  
  710. // Edit box ////////////////////////////////////////////////////////////////////
  711.  
  712. //
  713. // GUI.CreateEditBox( int x, int y, 
  714. //                    int width, int height, 
  715. //                    hwindow parent,
  716. //                    bool multi_line,
  717. //                    string default_text,
  718. //                      bool numeric )
  719. //
  720. // Create a 'text window' GUI element, with it's top-left hand corner in the 
  721. // given position, with the given width and height (all in frame units) and with
  722. // the given parent.
  723. // 
  724. // The sixth parameter determines whether or not the edit box should be 
  725. // multi-line. The final argument sets the box's default text.
  726. //
  727. // The seventh determines whether the edit box will only accept characters in
  728. // [0-9]
  729. //
  730. prototype hwindow GUI.CreateEditBox( int x, int y,
  731.                                      int width, int height,
  732.                                      hwindow parent,
  733.                                      bool multi_line,
  734.                                      string default_text,
  735.                                      bool numeric );
  736.  
  737. //
  738. // GUI.SetEditBoxCharLength( hwindow edit_box, int length )
  739. //
  740. // Set the maximum number of characters allowed in a single line edit box
  741. //
  742. prototype GUI.SetEditBoxMaxCharLength( hwindow edit_box, int length );
  743.  
  744.  
  745. //
  746. // string GUI.EditBoxValue( hwindow edit_box )
  747. //
  748. // Get the value entered into the given edit box.
  749. //
  750. prototype string GUI.EditBoxValue( hwindow edit_box );
  751.  
  752. //
  753. // string GUI.SetEditBoxValue( hwindow edit_box, string text )
  754. //
  755. // Set the value entered into the given edit box.
  756. //
  757. prototype string GUI.SetEditBoxValue( hwindow edit_box, string text );
  758.  
  759. //
  760. // GUI.SetEditBoxOverrides( 
  761. //    hwindow edit_box,
  762. //    string start_editing, 
  763. //  string cancel_editing,
  764. //  string finish_editing )
  765. //
  766. // Set optional Pog functions to be called when editing begins, is cancelled
  767. // or is finished
  768. //
  769. prototype GUI.SetEditBoxOverrides( hwindow edit_box,
  770.                                    string start_editing, 
  771.                                    string cancel_editing,
  772.                                    string finish_editing );
  773.  
  774. //
  775. // GUI.SetEditBoxCursorToEnd( hwindow edit_box )
  776. //
  777. // Set the edit box cursor to the end.
  778. //
  779. prototype GUI.SetEditBoxCursorToEnd( hwindow edit_box );
  780.  
  781. // List box ////////////////////////////////////////////////////////////////////
  782.  
  783. //
  784. // GUI.CreateListBox( int x, int y, 
  785. //                    int width, int height, 
  786. //                    hwindow parent,
  787. //                    bool selectable,
  788. //                      bool multiple_selection )
  789. //
  790. // Create a 'list box' GUI element, with it's top-left hand corner in the 
  791. // given position, with the given width and height (all in frame units) and with
  792. // the given parent.
  793. // 
  794. // The sixth parameter determines whether or not the list box is selectable, which 
  795. // overrides the seventh parameter determines whether or not more than one entry in the 
  796. // box can be selected at once.
  797. //
  798. prototype hwindow GUI.CreateListBox( int x, int y,
  799.                                      int width, int height,
  800.                                      hwindow parent,
  801.                                      bool selectable,
  802.                                      bool multiple_selection );
  803.  
  804. //
  805. // GUI.AddListBoxEntry( hwindow list_box, hwindow entry );
  806. //
  807. // Adds the given entry (that is to say, window) to a list box.
  808. //
  809. prototype GUI.AddListBoxEntry( hwindow list_box, hwindow entry );
  810.  
  811. // !! Need a list box multi-selector value function
  812.  
  813. //
  814. // hwindow GUI.ListBoxValue( hwindow list_box )
  815. //
  816. // Get the selected value in the given list box. If it is a multiple selection
  817. // box then it returns the first. If there is no selection then return a null handle.
  818. //
  819. prototype hwindow GUI.ListBoxValue( hwindow list_box );
  820.  
  821. //
  822. // int GUI.ListBoxSelectedIndex( hwindow list_box )
  823. //
  824. // Get the (zero based) index of the selected value in the list box. If it is a 
  825. // multiple selection box then it returns the first. If there is no selection 
  826. // then return -1.
  827. //
  828. prototype int GUI.ListBoxSelectedIndex( hwindow list_box );
  829.  
  830. //
  831. // GUI.RemoveListBoxEntries( hwindow list_box )
  832. //
  833. // Remove all the list box entries.
  834. //
  835. prototype GUI.RemoveListBoxEntries( hwindow list_box );
  836.  
  837. //
  838. // hwindow GUI.RemoveListBoxEntry( hwindow list_box, int index )
  839. //
  840. // Remove the given list box entry and return the now parentless window
  841. //
  842. prototype hwindow GUI.RemoveListBoxEntry( hwindow list_box, int index );
  843.  
  844. //
  845. // GUI.CancelListBoxSelection( hwindow list_box )
  846. //
  847. // Cancel any list box selection(s)
  848. //
  849. prototype GUI.CancelListBoxSelection( hwindow list_box );
  850.  
  851. //
  852. // GUI.SelectListBoxEntry( hwindow list_box, int index )
  853. //
  854. // Make the list box entry at the given index selected.
  855. //
  856. prototype GUI.SelectListBoxEntry( hwindow list_box, int index );
  857.  
  858. //
  859. // GUI.SetListBoxGap( hwindow list_box, int gap )
  860. //
  861. // Set the vertical spacing between list box elements
  862. //
  863. prototype GUI.SetListBoxGap( hwindow list_box, int gap );
  864.  
  865. //
  866. // int GUI.ListBoxFocusedEntry( hwindow list_box )
  867. //
  868. // Which list box entry is being selected? -1 is no entry.
  869. //
  870. prototype int GUI.ListBoxFocusedEntry( hwindow list_box );
  871.  
  872. //
  873. // GUI.SetListBoxFocusedEntry( hwindow list_box, int entry )
  874. //
  875. // Set the list box focused entry.
  876. //
  877. prototype GUI.SetListBoxFocusedEntry( hwindow list_box, int entry );
  878.  
  879. //
  880. // GUI.DisableHighlight( hwindow list_box )
  881. //
  882. // Disable the orange highlight added by default by list boxes
  883. //
  884. prototype GUI.DisableHighlight( hwindow list_box );
  885.  
  886. //
  887. // GUI.SetListBoxSelectFunction( hwindow list_box, string function )
  888. //
  889. // Set the given Pog function to get called when a list box entry is selected
  890. //
  891. prototype GUI.SetListBoxSelectFunction( hwindow list_box, string function );
  892.  
  893. // Combo box ///////////////////////////////////////////////////////////////////
  894.  
  895. //
  896. // GUI.CreateComboBox( int x, int y, 
  897. //                     int width, int height, 
  898. //                     hwindow parent,
  899. //                     bool editable,
  900. //                       string default_value )
  901. //
  902. // Create a 'combo box' GUI element, with it's top-left hand corner in the 
  903. // given position, with the given width and height (all in frame units) and with
  904. // the given parent.
  905. // 
  906. // The sixth parameter determines whether or not the edit box portion of the 
  907. // combo box is editable. The final parameter is the default value to put in
  908. // the edit box portion of the box.
  909. //
  910. prototype hwindow GUI.CreateComboBox( int x, int y,
  911.                                       int width, int height,
  912.                                       hwindow parent,
  913.                                       bool editable,
  914.                                       string default_value );
  915.  
  916. //
  917. // GUI.AddComboBoxEntry( hwindow combo_box, string entry );
  918. //
  919. // Adds the given entry to a combo box.
  920. //
  921. prototype GUI.AddComboBoxEntry( hwindow combo_box, string entry );
  922.  
  923. //
  924. // string GUI.ComboBoxValue( hwindow combo_box )
  925. //
  926. // Get the value entered into the given combo box.
  927. //
  928. prototype string GUI.ComboBoxValue( hwindow combo_box );
  929.  
  930. //
  931. // int GUI.ComboBoxValueIndex( hwindow combo_box )
  932. //
  933. // Get the index into the list box of the value entered into the given combo 
  934. // box. Only for non-editable boxes. -1 will be used if no entry is selected or
  935. // if the box is editable.
  936. //
  937. prototype int GUI.ComboBoxValueIndex( hwindow combo_box );
  938.  
  939. // Checkbox ////////////////////////////////////////////////////////////////////
  940.  
  941. //
  942. // GUI.CreateCheckbox( int x, int y, 
  943. //                     int width, int height, 
  944. //                     hwindow parent,
  945. //                     bool checked )
  946. //
  947. // Create a 'checkbox' GUI element, with it's top-left hand corner in the 
  948. // given position, with the given width and height (all in frame units) and with
  949. // the given parent.
  950. // 
  951. // The sixth parameter determines whether or not the check box is checked.
  952. //
  953. prototype hwindow GUI.CreateCheckbox( int x, int y,
  954.                                       int width, int height,
  955.                                       hwindow parent,
  956.                                       bool checked );
  957.  
  958. //
  959. // bool GUI.CheckboxValue( hwindow check_box )
  960. //
  961. // Get the checked-ness of the given checkbox.
  962. //
  963. prototype bool GUI.CheckboxValue( hwindow check_box );
  964.  
  965. // Radio button ////////////////////////////////////////////////////////////////
  966.  
  967. //
  968. // GUI.CreateRadioButton( int x, int y, 
  969. //                        int width, int height, 
  970. //                        hwindow parent,
  971. //                        bool checked )
  972. //
  973. // Create a 'radio button' GUI element, with it's top-left hand corner in the 
  974. // given position, with the given width and height (all in frame units) and with
  975. // the given parent.
  976. // 
  977. // The sixth parameter determines whether or not the radio button is checked.
  978. //
  979. prototype hwindow GUI.CreateRadioButton( int x, int y,
  980.                                          int width, int height,
  981.                                          hwindow parent,
  982.                                          bool checked );
  983.  
  984. //
  985. // bool GUI.RadioButtonValue( hwindow radio_button )
  986. //
  987. // Get the checked-ness of the given radio button.
  988. //
  989. prototype bool GUI.RadioButtonValue( hwindow radio_button );
  990.  
  991. //
  992. // GUI.SetRadioButtonChecked( hwindow radio_button, bool checked )
  993. //
  994. // Set the checked-ness of the given radio button.
  995. //
  996. prototype GUI.SetRadioButtonChecked( hwindow radio_button, bool checked );
  997.  
  998. // Splitter window //////////////////////////////////////////////////////////////
  999.  
  1000. //
  1001. // GUI.CreateSplitterWindow( int x, int y, 
  1002. //                             int width, int height, 
  1003. //                           hwindow parent,
  1004. //                           int split,
  1005. //                             bool fancy )
  1006. //
  1007. // Creates a splitter window - that is a window which contains two other windows,
  1008. // with a horizontal line between them. The split parameter sets how far down
  1009. // the canvas of the window the split is placed.
  1010. //
  1011. prototype hwindow GUI.CreateSplitterWindow( int x, int y,
  1012.                                             int width, int height,
  1013.                                             hwindow parent,
  1014.                                             int split,
  1015.                                             bool fancy );
  1016.  
  1017. //
  1018. // GUI.CreateFancySplitterWindow( int x, int y, 
  1019. //                                  int width, int height, 
  1020. //                                  hwindow parent,
  1021. //                                  int split )
  1022. //
  1023. // Creates a fancy splitter window - that is a window which contains two other 
  1024. // windows, with a horizontal line between them. The split parameter sets how far 
  1025. // down the canvas of the window the split is placed.
  1026. //
  1027. prototype hwindow GUI.CreateFancySplitterWindow( int x, int y,
  1028.                                                  int width, int height,
  1029.                                                  hwindow parent,
  1030.                                                  int split );
  1031.  
  1032. //
  1033. // GUI.SplitterWindowTopWindow( hwindow window )
  1034. //
  1035. // Gets the top of the two windows contained in a splitter window.
  1036. //
  1037. prototype hwindow GUI.SplitterWindowTopWindow( hwindow window );
  1038.  
  1039.  
  1040. //
  1041. // GUI.SplitterWindowBottomWindow( hwindow window )
  1042. //
  1043. // Gets the bottom of the two windows contained in a splitter window.
  1044. //
  1045. prototype hwindow GUI.SplitterWindowBottomWindow( hwindow window );
  1046.  
  1047. // Shader window //////////////////////////////////////////////////////////////
  1048.  
  1049. //
  1050. // prototype GUI.SetShadyBarWidth( int width )
  1051. //
  1052. // Set the shady bar width
  1053. //
  1054. prototype GUI.SetShadyBarWidth( int width );
  1055.  
  1056. //
  1057. // prototype GUI.SetRHSShadyBarWidth( int width )
  1058. //
  1059. // Sets the RHS shady bar width
  1060. //
  1061. prototype GUI.SetRHSShadyBarWidth( int width );
  1062.  
  1063. // Slider control /////////////////////////////////////////////////////////////
  1064.  
  1065. //
  1066. // GUI.CreateSliderControl( int x, 
  1067. //                            int y, 
  1068. //                            int width, 
  1069. //                            int height, 
  1070. //                            hwindow parent,
  1071. //                            float start_value,
  1072. //                            float end_value,
  1073. //                            float step_value )
  1074. //
  1075. // Create a slider control
  1076. //
  1077. prototype hwindow GUI.CreateSliderControl( int x, int y, 
  1078.                                            int width, int height, 
  1079.                                            hwindow parent,
  1080.                                            float start_value,
  1081.                                            float end_value,
  1082.                                            float step_value );
  1083.  
  1084. //
  1085. // float GUI.SliderControlValue( hwindow slider_window )
  1086. //
  1087. // Get the value of the slider control
  1088. //
  1089. prototype float GUI.SliderControlValue( hwindow slider_window );
  1090.  
  1091. //
  1092. // GUI.SetSliderControlValue( hwindow slider_window, float value )
  1093. //
  1094. // Set the value of the slider control
  1095. //
  1096. prototype GUI.SetSliderControlValue( hwindow slider_window, float value );
  1097.  
  1098. //
  1099. // GUI.PlayBackgroundMovie( string movie, string text )
  1100. //
  1101. // Play a background spinny
  1102. //
  1103. prototype GUI.PlayBackgroundMovie(string movie, string text);
  1104.  
  1105. //
  1106. // GUI.StopBackgroundMovie()
  1107. //
  1108. // Stop the background movie
  1109. //
  1110. prototype GUI.StopBackgroundMovie();
  1111.  
  1112. //
  1113. // GUI.StopAllMovies()
  1114. //
  1115. // Stop the background movie or spinny
  1116. //
  1117. prototype GUI.StopAllMovies();
  1118.  
  1119. #endif // FLUX_LIB
  1120.  
  1121.  
  1122.